import React, { useState } from "react";
export default function (props) {
    let [type,setType] = useState("name");
    let [value,setValue] = useState("");
    const handleClick = () => {
        props.show({type,value});
    }
    return (
        <div>
            <select onChange={e => setType(e.target.value)}>
                <option value="name">姓名</option>
                <option value="gender">性别</option>
                <option value="age">年龄</option>
            </select>
            <input type="text" placeholder="请输入搜索值" onInput={e => setValue(e.target.value)} />
            <input type="button" value="搜索" onClick={handleClick} />
        </div>
    );
}
